<?php
/**
 * 统计控制器
 */

namespace app\api\controller;

use think\response\Json;
use app\api\service\TongjiService;
use app\common\validate\TongjiValidate;
use app\api\exception\ApiServiceException;

class TongjiController extends ApiBaseController
{
    /**
     * 列表
     * @param TongjiService $service
     * @return Json
     */
    public function index(TongjiService $service): Json
    {
        try {
            $data   = $service->getList($this->param, $this->page, $this->limit);
            $result = [
                'tongji' => $data,
            ];

            return api_success($result);
        } catch (ApiServiceException $e) {
            return api_error($e->getMessage());
        }
    }

    

    

    

    

    

    
}
